<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="icon" href="https://static.nowcoder.com/images/logo_87_87.png"/>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          crossorigin="anonymous">
    <link rel="stylesheet" href="../css/global.css" th:href="@{/css/global.css}"/>
    <title>小治论坛-个人主页</title>
</head>
<body>
<div class="nk-container">
    <!-- 头部 -->
    <header class="bg-dark sticky-top" th:replace="index :: header">
        <div class="container">
            <!-- 导航 -->
            <nav class="navbar navbar-expand-lg navbar-dark">
                <!-- logo -->
                <a class="navbar-brand" href="#"></a>
                <button class="navbar-toggler" type="button" data-toggle="collapse"
                        data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <!-- 功能 -->
                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav mr-auto">
                        <li class="nav-item ml-3 btn-group-vertical">
                            <a class="nav-link" href="../index.html">首页</a>
                        </li>
                        <li class="nav-item ml-3 btn-group-vertical">
                            <a class="nav-link position-relative" href="letter.html">消息<span class="badge badge-danger">12</span></a>
                        </li>
                        <li class="nav-item ml-3 btn-group-vertical">
                            <a class="nav-link" href="register.html">注册</a>
                        </li>
                        <li class="nav-item ml-3 btn-group-vertical">
                            <a class="nav-link" href="login.html">登录</a>
                        </li>
                        <li class="nav-item ml-3 btn-group-vertical dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
                               data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <img src="http://images.nowcoder.com/head/1t.png" class="rounded-circle"
                                     style="width:30px;"/>
                            </a>
                            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item text-center" href="profile.html">个人主页</a>
                                <a class="dropdown-item text-center" href="setting.html">账号设置</a>
                                <a class="dropdown-item text-center" href="login.html">退出登录</a>
                                <div class="dropdown-divider"></div>
                                <span class="dropdown-item text-center text-secondary">nowcoder</span>
                            </div>
                        </li>
                    </ul>
                    <!-- 搜索 -->
                    <form class="form-inline my-2 my-lg-0" action="search.html">
                        <input class="form-control mr-sm-2" type="search" aria-label="Search"/>
                        <button class="btn btn-outline-light my-2 my-sm-0" type="submit">搜索</button>
                    </form>
                </div>
            </nav>
        </div>
    </header>

    <!-- 内容 -->
    <div class="main">
        <div class="container">
            <!-- 选项 -->
            <div class="position-relative">
                <ul class="nav nav-tabs">
                    <li class="nav-item">
                        <a class="nav-link active" href="profile.html">个人信息</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="my-post.html" th:href="@{/discuss/my}">我的帖子</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="my-reply.html">我的回复</a>
                    </li>
                </ul>
            </div>
            <!-- 个人信息 -->
            <div class="media mt-5">
                <img src="http://images.nowcoder.com/head/1t.png" th:src="${user.headerUrl}"
                     class="align-self-start mr-4 rounded-circle" alt="用户头像" style="width:50px;">
                <div class="media-body">
                    <h5 class="mt-0 text-warning">
                        <span th:text="${user.username}">nowcoder</span>
                        <input type="hidden" id="entityId" th:value="${user.id}">
                        <button type="button"
                                th:class="|btn ${hasFollowed?'btn-secondary':'btn-info'} btn-sm float-right mr-5 follow-btn|"
                                th:text="${hasFollowed?'已关注':'关注TA'}"
                                th:if="${loginUser!=null&&loginUser.id!=user.id}">关注TA
                        </button>
                    </h5>
                    <div class="text-muted mt-3">
							<span>注册于 <i class="text-muted"
                                         th:text="${#dates.format(user.createTime, 'yyyy-MM-dd HH:mm:ss')}">2015-06-12 15:20:12</i></span>
                    </div>
                    <div class="text-muted mt-3 mb-5">
							<span>关注了
								<a class="text-primary" href="followee.html" th:href="@{|/followees/${user.id}|}"
                                   th:text="${followeeCount}">5</a> 人
							</span>
                        <span class="ml-4">关注者
								<a class="text-primary" href="follower.html" th:href="@{|/followers/${user.id}|}"
                                   th:text="${followerCount}">123</a> 人
							</span>
                        <span class="ml-4">获得了 <i class="text-danger" th:text="${likeCount}">87</i> 个赞</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 尾部 -->
    <footer class="bg-dark" th:replace="index::footer">
    </footer>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script>
<script src="../js/global.js" th:src="@{/js/global.js}"></script>
<script src="../js/profile.js" th:src="@{/js/profile.js}"></script>
</body>
</html>
